package com.zs.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zs.common.utils.PageUtils;
import com.zs.gulimall.order.entity.OrderEntity;
import com.zs.gulimall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author zs
 * @email zs@gmail.com
 * @date 2023-07-15 21:28:46
 */
public interface OrderService extends IService<OrderEntity> {


    PageUtils queryPage(Map<String, Object> params);


    /**
     * 订单确认页返回需要用的数据
     * @return
     */
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;


    /**
     * 下单
     * @param vo
     * @return
     */
    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);


    OrderEntity getOrderByOrderSn(String orderSn);


    void closeOrder(OrderEntity entity);
}

